<div class="am-u-md-4 blog-sidebar">
    <div class="am-panel-group">
        <div class="am-input-group" data-am-sticky>
            <input type="text" class="am-form-field am-input-sm" placeholder="搜索" id="search" onkeypress="if (event.keyCode == 13) search();">
            <span class="am-input-group-btn">
                    <button class="am-btn am-btn-default" type="button" onclick="search()"><span class="am-icon-search"></span> </button>
                </span>
        </div>
        <br>
        <section class="am-panel am-panel-default">
            <div class="am-panel-hd">分类目录</div>
            <ul class="am-list blog-list">
                {volist name="category_list" id="vo"}
                <li><a href="/cate?id={$vo.id}">{$vo.name}</a></li>
                {/volist}
            </ul>
        </section>
        <br>
        <section class="am-panel am-panel-default">
            <div class="am-panel-hd">近期文章</div>
            <ul class="am-list blog-list">
                {volist name="article_recent" id="vo"}
                <li><a href="/read?id={$vo.id}"><span class="am-badge am-badge-success am-radius">{$i}</span>&nbsp;{$vo.title}</a></li>
                {/volist}
                <li><a href="/home">>>更多</a></li>
            </ul>
        </section>
        <br>
        <section class="am-panel am-panel-default">
            <div class="am-panel-hd">热门文章</div>
            <ul class="am-list blog-list">
                {volist name="article_hot" id="vo"}
                <li><a href="/read?id={$vo.id}"><span class="am-badge am-badge-danger am-radius">{$i}</span>&nbsp;{$vo.title}</a></li>
                {/volist}
                <li><a href="/home">>>更多</a></li>
            </ul>
        </section>
    </div>
</div>
<script type="text/javascript">
    function search() {
        var key=$("#search").val();
        window.location.href='/search?kw='+key;
    }
</script>